package com.yanqu.road.entity.activity.langyabang.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.activity.langyabang.entity.LangYaTypePatrons;
import com.yanqu.road.entity.activity.langyabang.entity.LangYaUserEvent;
import com.yanqu.road.entity.activity.langyabang.entity.LangYaUserPatronsInfo;
import com.yanqu.road.utils.property.Property;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@FieldTypeAnnotation(tableName = "t_c_lang_ya_user_data")
public class LangYaBangUserData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id",select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "分组id",select = true,update = true)
    private int groupId;
    @FieldTypeAnnotation(desc = "玩家id",update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "服务器id")
    private long serverId;
    @FieldTypeAnnotation(desc = "玩家各个驻地等级")
    private Map<Integer,Integer> buildingLevel;
    @FieldTypeAnnotation(desc = "玩家当前处理事件")     //代政事件 pve事件 pvp事件
    private int eventIdNow;
    @FieldTypeAnnotation(desc = "求策体力")
    private int power;
    @FieldTypeAnnotation(desc = "历史最高体力 用于大r解锁多倍数骰子")
    private int historyPower;
    @FieldTypeAnnotation(desc = "历史总使用体力,数据分析要用")
    private int hasAllUsedPower;
    @FieldTypeAnnotation(desc = "上次恢复体力时间")
    private long lastRecoveryTime;
    @FieldTypeAnnotation(desc = "金币")
    private long coin;
    @FieldTypeAnnotation(desc = "事件")
    private LangYaUserEvent event;
    @FieldTypeAnnotation(desc = "上次被打败时间")
    private long lastBeenBeatTime;
    @FieldTypeAnnotation(desc = "活动中所属商会")
    private String unionId;
    @FieldTypeAnnotation(desc = "活动中的门客战斗力信息")
    private Map<Integer, LangYaTypePatrons> userPatronsInfoMap;
    @FieldTypeAnnotation(desc = "别人使用了你的宣战或被代政的奖励")
    private Property otherGiveReward;
    @FieldTypeAnnotation(desc = "别人使用了你的宣战或被代政获得的金币")
    private long otherGiveCoin;
    @FieldTypeAnnotation(desc = "别人使用了你的宣战或被代政获得的积分 仅记录 实际得到就加了")
    private long otherGiveScore;
    @FieldTypeAnnotation(desc = "别人使用了你的宣战或被代政的奖励份数")
    private int otherGiveRewardNum;
    @FieldTypeAnnotation(desc = "当前积分,只有pvp和宣战pvp会变动")
    private long score;
    @FieldTypeAnnotation(desc = "活动总获得金币数量")
    private long historyCoinNum;
    @FieldTypeAnnotation(desc = "保底数据")
    private Map<Integer,Integer> drawTime;
    @FieldTypeAnnotation(desc = "本次活动所有的摇骰子次数(引导用)")
    private int totalDrawTimes;
    @FieldTypeAnnotation(desc = "开关")
    List<Integer> openSwitchList = new ArrayList<>();

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }
    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, java.lang.Integer> getBuildingLevel() {
        return buildingLevel;
    }
    public void setBuildingLevel(java.util.Map<java.lang.Integer, java.lang.Integer> buildingLevel) {
        if (null == buildingLevel){
            return;
        }
        if (this.buildingLevel == null || !this.buildingLevel.equals(buildingLevel)) {
            this.buildingLevel = buildingLevel;
            setOp(DataStatus.Update);
        }
    }

    public int getEventIdNow() {
        return eventIdNow;
    }
    public void setEventIdNow(int eventIdNow) {
        if (this.eventIdNow != eventIdNow) {
            this.eventIdNow = eventIdNow;
            setOp(DataStatus.Update);
        }
    }

    public int getPower() {
        return power;
    }
    public void setPower(int power) {
        if (this.power != power) {
            this.power = power;
            setOp(DataStatus.Update);
        }
    }

    public long getLastRecoveryTime() {
        return lastRecoveryTime;
    }
    public void setLastRecoveryTime(long lastRecoveryTime) {
        if (this.lastRecoveryTime != lastRecoveryTime) {
            this.lastRecoveryTime = lastRecoveryTime;
            setOp(DataStatus.Update);
        }
    }

    public long getCoin() {
        return coin;
    }
    public void setCoin(long coin) {
        if (this.coin != coin) {
            this.coin = coin;
            setOp(DataStatus.Update);
        }
    }

    public LangYaUserEvent getEvent() {
        return event;
    }
    public void setEvent(LangYaUserEvent event) {
        if (null == event){
            return;
        }
        if (this.event == null || !this.event.equals(event)) {
            this.event = event;
            setOp(DataStatus.Update);
        }
    }

    public long getLastBeenBeatTime() {
        return lastBeenBeatTime;
    }
    public void setLastBeenBeatTime(long lastBeenBeatTime) {
        if (this.lastBeenBeatTime != lastBeenBeatTime) {
            this.lastBeenBeatTime = lastBeenBeatTime;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return unionId;
    }
    public void setUnionId(String unionId) {
        if (unionId == null){
            return;
        }
        if (this.unionId == null || !this.unionId.equals(unionId)) {
            this.unionId = unionId;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.langyabang.entity.LangYaTypePatrons> getUserPatronsInfoMap() {
        return userPatronsInfoMap;
    }

    public void setUserPatronsInfoMap(java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.langyabang.entity.LangYaTypePatrons> userPatronsInfoMap) {
        if (null == userPatronsInfoMap) {
            return;
        }
        this.userPatronsInfoMap = userPatronsInfoMap;
        setOp(DataStatus.Update);
    }

    public Property getOtherGiveReward() {
        return otherGiveReward;
    }
    public void setOtherGiveReward(Property otherGiveReward) {
        if (null == otherGiveReward){
            return;
        }
        if (this.otherGiveReward == null || !this.otherGiveReward.equals(otherGiveReward)) {
            this.otherGiveReward = otherGiveReward;
            setOp(DataStatus.Update);
        }
    }

    public int getOtherGiveRewardNum() {
        return otherGiveRewardNum;
    }

    public void setOtherGiveRewardNum(int otherGiveRewardNum) {
        if (this.otherGiveRewardNum != otherGiveRewardNum) {
            this.otherGiveRewardNum = otherGiveRewardNum;
            setOp(DataStatus.Update);
        }
    }

    public long getOtherGiveScore() {
        return otherGiveScore;
    }
    public void setOtherGiveScore(long otherGiveScore) {
        if (this.otherGiveScore != otherGiveScore) {
            this.otherGiveScore = otherGiveScore;
            setOp(DataStatus.Update);
        }
    }

    public long getOtherGiveCoin() {
        return otherGiveCoin;
    }
    public void setOtherGiveCoin(long otherGiveCoin) {
        if (this.otherGiveCoin != otherGiveCoin) {
            this.otherGiveCoin = otherGiveCoin;
            setOp(DataStatus.Update);
        }
    }

    public LangYaBangUserData() {
    }

    public long getScore() {
        return score;
    }
    public void setScore(long score) {
        if (this.score != score) {
            this.score = score;
            setOp(DataStatus.Update);
        }
    }

    public long getHistoryCoinNum() {
        return historyCoinNum;
    }
    public void setHistoryCoinNum(long historyCoinNum) {
        if (this.historyCoinNum != historyCoinNum) {
            this.historyCoinNum = historyCoinNum;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, java.lang.Integer> getDrawTime() {
        return drawTime;
    }
    public void setDrawTime(java.util.Map<java.lang.Integer, java.lang.Integer> drawTime) {
        if (null == drawTime){
            return;
        }
        if (this.drawTime == null || !this.drawTime.equals(drawTime)) {
            this.drawTime = drawTime;
            setOp(DataStatus.Update);
        }
    }

    public int getTotalDrawTimes() {
        return totalDrawTimes;
    }
    public void setTotalDrawTimes(int totalDrawTimes) {
        if (this.totalDrawTimes != totalDrawTimes) {
            this.totalDrawTimes = totalDrawTimes;
            setOp(DataStatus.Update);
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if (this.serverId != serverId) {
            this.serverId = serverId;
            setOp(DataStatus.Update);
        }
    }

    public int getHistoryPower() {
        return historyPower;
    }
    public void setHistoryPower(int historyPower) {
        if (this.historyPower != historyPower) {
            this.historyPower = historyPower;
            setOp(DataStatus.Update);
        }
    }

    public int getHasAllUsedPower() {
        return hasAllUsedPower;
    }

    public void setHasAllUsedPower(int hasAllUsedPower) {
        if (this.hasAllUsedPower != hasAllUsedPower) {
            this.hasAllUsedPower = hasAllUsedPower;
            setOp(DataStatus.Update);
        }
    }

    public List<Integer> getOpenSwitchList() {
        return openSwitchList;
    }

    public void setOpenSwitchList(List<Integer> openSwitchList) {
        if (openSwitchList == null) return;
        this.openSwitchList = openSwitchList;
        setUpdateOption();
    }
}
